package com.zl.zlproject.ui.me.activity;

import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;
import android.widget.TextView;

import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.zl.zlproject.R;
import com.zl.zlproject.base.activity.BaseActivity;

import butterknife.BindView;

/**
 * Created by 郑磊 on 2018/6/19.
 */

public class AboutAuthorActivity extends BaseActivity {

    @BindView(R.id.refreshLayout)
    SmartRefreshLayout mRefreshLayout;
    @BindView(R.id.iv_back)
    ImageView mIvBack;
    @BindView(R.id.tv_title)
    TextView mTvTitle;
    @BindView(R.id.toolbar)
    Toolbar mToolbar;
    @BindView(R.id.iv_icon)
    ImageView mIvIcon;



    @Override
    protected int getContentViewRes() {
        return R.layout.activity_about_author;
    }

    @Override
    protected void initView() {
        mTvTitle.setText(getString(R.string.about_author));
        initStatusBar(mToolbar);
        mToolbar.setTitle("");
        mIvBack.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    finish();
                }
            });

        doAnimation();
    }

    private void doAnimation() {
        RotateAnimation animation =new RotateAnimation(0, 360,
                Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,0.5f);
        animation.setRepeatMode(Animation.RESTART);
        animation.setRepeatCount(Animation.INFINITE);
        //匀速
        LinearInterpolator lir = new LinearInterpolator();
        animation.setInterpolator(lir);
        animation.setDuration(10000L);
        mIvIcon.startAnimation(animation);
    }


}
